<template>
 <div>
    <div id="app" v-if='$route.meta.name!=="404"'>
    <sph-header></sph-header>
    <router-view></router-view>
    <sph-footer v-show='!$route.meta.hideFooter'></sph-footer>
  </div>
  <div v-else>
    <router-view></router-view>
  </div>
 </div>
</template>

<script>
import header from './components/header/header.vue'
import footer from './components/footer/footer.vue';
import {mapActions} from 'vuex';
import store from './store/store'
export default {
  name: 'App',
  components:{
    'sph-header':header,
    'sph-footer':footer,
  },
  methods:{
    ...mapActions(['getCategoryList','getMockList','getFloors','autoLogin'])
  },
  /* async created(){
    if(store.state.user.token){
      await this.autoLogin();
    }
    
  }, */
  async mounted(){
    await this.getCategoryList()
    await this.getMockList()
    await this.getFloors()
  }
 
}
</script>

<style>

</style>
